<!-- echarts 地图下钻功能研究 -->

function renderMap (map, data) {
    // 初始化绘制省市地图配置
    var cityMapContainer = document.getElementById('map_1');
    var myMapChart = echarts.init(cityMapContainer);
    option.title = {
        text: map + '疫情地图',
        subtext: '点击标题返回全国地图',
        triggerEvent: true
    };
    option.tooltip = {
            trigger: 'item'
        };
    option.visualMap = {
        min: 0,
        max: 1500,
        show: false,
        left: 'right',
        top: 'bottom',
        text: ['高', '低'], // 文本，默认为数值文本
        calculable: true,
        textStyle: {
            color: '#fff'
        }
    };
    option.series = [
      {
        name: '确诊人数',
        type: 'map',
        mapType: map,
        roam: false,
        data: data['city'][map],
        label: {
            show: true,
            emphasis: {//对应的鼠标悬浮效果
                show: false,
                textStyle:{color:"#800080"}
            }
        },
        itemStyle: {
            normal: {
                borderWidth: .5,//区域边框宽度
                borderColor: '#002097',//区域边框颜色
                areaColor:"#4c60ff",//区域颜色
            },
            emphasis: {
                borderWidth: .5,
                borderColor: '#4b0082',
                areaColor:"#ffdead",
            }
        }
      }
    ];
    // 渲染地图
    myMapChart.setOption(option);
    myMapChart.on('click', function (params) {
        if (params.componentType == 'title') {
            mymap(local_var)
        }
    })
}